Electric parts such as an engine, a transmission, a brake, an air conditioner, a light, a power window, and the like mounted on a vehicle are controlled by electronic control units (ECUs) which communicate messages with one another via a LAN mounted on the vehicle.
A CAN is widely used as a communication protocol of the LAN mounted on the vehicle. The CAN is of an event-driven type. Thus while a message of other ECU is being communicated through a communication line, one ECU is incapable of sending a message through the communication line. When the communication line is vacant, one ECU is capable of sending the message.
In recent years, with an increase of the ECU mounted on the vehicle, there is an increase in the amount of data to be communicated through the LAN mounted on the vehicle. Thus there is a demand for the development of a protocol which provides a higher communication speed and reliability than the CAN. Such being the case, as a new communication protocol, the FlexRay attracts public attention. The FlexRay is of a time trigger type which allows a message to be sent and received by using a time slot which is time-divided at a predetermined unit time. Each of ECUs connected to the communication line of the FlexRay sends a message at a time slot assigned thereto in advance.
There is a case in which the LAN using the CAN is mounted on a vehicle. Thus in improving the reliability of the LAN mounted on the vehicle and the communication speed thereof by using the FlexRay as the communication protocol, frequently by utilizing the existing LANs, mounted on the vehicle, which use the CAN, the LANs are connected to each other with the communication line of the FlexRay. In this case, it is necessary to relay messages between communication lines using different communication protocols.
Therefore as disclosed in Japanese Patent Application Laid-Open No. 2005-328119 (patent document 1), the communication message conversion apparatus (relay connection unit) is disposed between the communication line using the CAN as the communication protocol thereof and the communication line using the FlexRay as the communication protocol thereof. The communication message conversion apparatus converts messages in conformity to the communication format of each communication protocol and the frame formats of messages.
More specifically, as shown in FIG. 9, the CAN communication line 103 to which the ECU 102 is connected and the FlexRay communication line 104 receive and send messages via the communication message conversion apparatus (relay connection unit) 100. As shown in FIG. 10(A), the CAN message 105 having the message size section (control field showing data length), the message ID section (arbitration field indicating ID), and the CAN payload section (data field indicating content of message) is sent to the CAN communication line 103. As shown in FIG. 10(B), after the control section 100a of the relay connection unit 100 which has received the CAN message 105 compresses the message ID section into the message index, as shown in FIG. 10(C), the control section 100a stores a plurality of the CAN messages 105 at the payload section of the FlexRay, and as shown in FIG. 10(D), attaches the header section to the payload section of the FlexRay to obtain the FlexRay message 106. The relay connection unit 100 sends the FlexRay message 106 to the FlexRay communication line 105.
By sending the FlexRay message converted from the CAN message to the FlexRay communication line, the message is relayed between the CAN communication line and the FlexRay communication line having different communication protocols.
In sending a message from the FlexRay communication line to the CAN communication line, the relay connection unit performs an operation reverse to the above-described operation and separates a plurality of the stored FlexRay messages into CAN messages, thus sending them to the CAN communication line.
In sending the message to the FlexRay communication line and receiving the message therefrom in the manner described in the patent document 1, the message is sent and received by using the time slot time-divided at the predetermined unit time, as described above. The time slot at which the relay connection unit is capable of sending the message is predetermined. For example, as shown in FIG. 11, let it be supposed that the relay connection unit is capable of sending a message to the FlexRay communication line at a time slot number “2” and “6”. Two CAN messages “4” and “5” received between the time when the message is sent at the slot number “2” and the timing of the slot number “5” are collected into one FlexRay message. The FlexRay message is sent to the FlexRay communication line at the slot number “6”.
In the above-described setting, as shown at the portion A of FIG. 11, if the arrival of the CAN message “3” at the relay connection unit delays owing to congestion or the like of the CAN communication line, the CAN message “3” which has been relayed to the FlexRay communication line at the timing of the slot number “2” is relayed at the slot number “6” as shown at the portion B-2. Further the CAN message “4” which has been relayed at the timing of the slot number “6” is relayed at the slot number “2” as shown at the portion B-1. That is, the communication message conversion apparatus 100 has a problem that the arrival of the CAN message at the relay connection unit delays and the order is replaced and thereby the period of the transmission of the CAN message to the FlexRay communication line and the transmission order thereof are not observed, which causes a time fluctuation in the relay of the CAN message.
In the patent document 1, not only the CAN payload section of the CAN message, but also the message ID section and the size section thereof are stored at the payload section of the FlexRay message and sent to the FlexRay communication line. But the message ID section of the CAN message and the size section thereof are unnecessary for sending and receiving the FlexRay message. The communication message conversion apparatus disclosed in the patent document 1 has a problem that unnecessary data is included in the payload section of the FlexRay message.    Patent document 1: Japanese Patent Application Laid-Open No. 2005-328119